package cn.enilu.flash.dao.shop;


import cn.enilu.flash.bean.entity.shop.GoodsSku;
import cn.enilu.flash.dao.BaseRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface GoodsSkuRepository extends BaseRepository<GoodsSku,Long>{

    @Query(nativeQuery = true, value =
            " select count(*) as count  from t_shop_goods_sku A where JSON_CONTAINS(cast(CONCAT('[',A.code,']') as json),JSON_ARRAY(?1)) and disable = 0 ")
    Long getCountBySkuValID(Long valId);
}

